package com.hissy.common.design.structure.decorator;

/**
 * Created by zhangyanfei on 2019/4/10.
 *
 * @author zhangyanfei
 * @date 2019/04/10
 */
public class DecoratorMain {

    public static void main(String[] args) {
        // java IO 就是使用装饰器模式
        HumanImpl human = new HumanImpl();
        Decorator decorator = new DecoratorTwo(new DecoratorOne(new Decorator(human)));
        decorator.walkToWhere();
        decorator.wearClothes();
    }
}
